package com.snack.shop.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

@Data
@EqualsAndHashCode(callSuper = true)
@TableName("t_merchant_message")
@Schema(description = "商家消息表")
public class MerchantMessage extends BaseEntity {

    @Schema(description = "商家ID")
    @TableField("merchant_id")
    @JsonProperty("merchantId")
    private Long merchantId;

    @Schema(description = "消息类型：1-订单通知，2-退款通知，3-结算通知，4-反馈通知")
    private Integer type;

    @Schema(description = "标题")
    private String title;

    @Schema(description = "内容")
    private String content;

    @Schema(description = "业务类型")
    @TableField("biz_type")
    @JsonProperty("bizType")
    private String bizType;

    @Schema(description = "业务ID")
    @TableField("biz_id")
    @JsonProperty("bizId")
    private Long bizId;

    @Schema(description = "阅读状态：0-未读，1-已读")
    @TableField("read_status")
    @JsonProperty("readStatus")
    private Integer readStatus;

    @Schema(description = "阅读时间")
    @TableField("read_time")
    @JsonProperty("readTime")
    private LocalDateTime readTime;
}
